package hu.vissy.yacap;

import java.util.EnumSet;

/**
 * Unnamed option multiplicity.
 * 
 * @author balage
 * 
 */
public enum UnnamedOptionMultiplicity {

    /* Unnamed options allowed. */
    ENABLED,
    /* Unnamed options are optional. */
    OPTIONAL,
    /* Multiple unnamed options allowed. */
    MULTIPLE;

    /**
     * No unnamed options allowed.
     */
    public static final EnumSet<UnnamedOptionMultiplicity> NONE = EnumSet.noneOf(UnnamedOptionMultiplicity.class);
    /**
     * A single unnamed option is allowed, but optional.
     */
    public static final EnumSet<UnnamedOptionMultiplicity> ONE_OR_NONE = EnumSet.of(ENABLED, OPTIONAL);
    /**
     * A single unnamed option is required.
     */
    public static final EnumSet<UnnamedOptionMultiplicity> SINGLE = EnumSet.of(ENABLED);
    /**
     * Multiple unnamed options are allowed, but they are optional.
     */
    public static final EnumSet<UnnamedOptionMultiplicity> MULTIPLE_OPTIONAL = EnumSet.of(ENABLED, OPTIONAL, MULTIPLE);
    /**
     * Multiple unnamed options are allowed, but at least one should be
     * provided.
     */
    public static final EnumSet<UnnamedOptionMultiplicity> AT_LEAST_ONE = EnumSet.of(ENABLED, MULTIPLE);

}
